//
//  KHModel.m
//  KHDBTools_Example
//
//  Created by 西安陪跑网络科技有限公司 on 2018/2/2.
//  Copyright © 2018年 apang. All rights reserved.
//

#import "KHModel.h"

static NSArray * LastNames(){
    return @[@"王",@"李",@"张",@"刘",@"陈",@"杨",@"赵",@"黄",@"周",@"吴",@"徐",@"孙",@"胡",@"朱",@"高",@"林",@"何",@"郭",@"马",@"罗",@"梁",@"宋",@"郑",@"谢",@"韩",@"唐",@"冯",@"于",@"董",@"萧",@"程",@"曹",@"袁",@"邓",@"许",@"傅",@"沈",@"曾",@"彭",@"吕",@"苏",@"卢",@"蒋",@"蔡",@"贾",@"丁",@"魏",@"薛",@"叶",@"阎",@"余",@"潘",@"杜",@"戴",@"夏",@"锺",@"汪",@"田",@"任",@"姜",@"范",@"方",@"石",@"姚",@"谭",@"廖",@"邹",@"熊",@"金",@"陆",@"郝",@"孔",@"白",@"崔",@"康",@"毛",@"邱",@"秦",@"江",@"史",@"顾",@"侯",@"邵",@"孟",@"龙",@"万",@"段",@"雷",@"钱",@"汤",@"尹",@"黎",@"易",@"常",@"武",@"乔",@"贺",@"赖",@"龚",@"文"];
}

static NSArray * FirstNames(){
    return @[@"英",@"梅",@"华",@"兰",@"珍",@"芳",@"伟",@"军",@"丽",@"敏",@"荣",@"勇",@"静",@"燕",@"娟",@"婷",@"强",@"云",@"杰",@"平",@"超",@"红",@"艳",@"磊",@"丹",@"萍",@"霞",@"斌",@"波",@"玲",@"涛",@"明",@"峰",@"浩",@"飞",@"辉",@"俊",@"鑫",@"鹏",@"林",@"慧",@"颖",@"洋",@"国",@"刚",@"莉",@"倩",@"娜",@"龙",@"亮",@"琴",@"凯",@"帅",@"雪",@"琳",@"晶",@"阳",@"博",@"兵",@"洁",@"芝",@"宇",@"宁",@"健",@"建",@"岩",@"帆",@"瑞",@"花",@"佳",@"香",@"欢",@"欣",@"莹",@"坤",@"利",@"旭",@"文",@"雷",@"彬",@"柳",@"晨",@"凤",@"璐",@"瑜",@"畅",@"玉",@"想",@"楠",@"东",@"杨",@"成"];
}
static int randomIndex(int max){
    srand((unsigned) time(NULL));
    return rand()%max;
}

@implementation KHModel
@synthesize name = _name,age = _age;

- (NSString *)name {
    if (!_name) {
        return [LastNames()[randomIndex(99)] stringByAppendingString:FirstNames()[randomIndex(91)]];
    }
    return _name;
}
- (NSInteger)age {
    if (_age == 0) {
        return randomIndex(90);
    }
    return _age;
}
@end
